var app = angular.module("myapp", ["ngCookies", "ngMessages"]);
app.controller("newUserCtrl", ["$scope", "$http", '$cookies', "$cookieStore", "$location", function ($scope, $http, $cookies, $cookieStore, $location) {
    $scope.cookie = $cookies.get("msg");
    $scope.removecookie = function () {
        $cookies.remove("msg");
    };
    window.onbeforeunload = function () {
        $cookies.remove("msg");
    };
    //获取验证码
    $scope.loginCode = function () {
            $http.post("sendCode.action",angular.toJson({tel:$scope.newuser.tel})).then(function (success) {console.log(success.data)}, function (err) {});
    };
    $scope.login_host="http://"+$location.host()+":"+$location.port()+"/PHM";
}]);